package com.example.design.status;

/**
 * @author: Bin.L
 * @date: 2022/3/14 11:27
 * @Description: 任务初始状态
 */
public class TaskInit implements State {

    @Override
    public void update(TaskTest task, DefinitionEnum.ActionType actionType) {
        if  (actionType == DefinitionEnum.ActionType.START) {
            task.setState(new TaskOngoing());
            System.out.println("行为开始, 任务状态变更为进行中");
        }
    }
}
